
#!/usr/local/bin/perl


$input = "2010.false.SVMinput.txt";
$outfile = "2010.false.features"; #destination for output files

# open input and output files
open(FIN, $input)        or die "Can\'t open list of input file $inputList; error $!";
open (FOUT, ">$outfile")   or die "Can\'t open output file $outfile; error $!";

$count = 0;

while ($line = <FIN>) {
  $line =~ s/^\s+//; #remove leading whites
  if ($line =~ m/0\s+\d+/) {
    ++$count;
    $line =~ s/0\ \ \ /-1\ \ \ /;
  }

  print FOUT $line;

} #while loop

close(FOUT);
close(FIN);

print "$count Matches found \n";
print "Converted Successfully\n";
exit;
